#cmake_minimum_required(VERSION 3.4.1)
#set(SRC_DIR src/main/jni)
#include_directories(src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common)
#aux_source_directory(src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common SRC_LIST)
##aux_source_directory(src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc src_amr_nb_nec)
#
##aux_source_directory(src/main/jni/oscl oscl_src)
#
#
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/jniLibs/${ANDROID_ABI})
#
##add_library(amr-codec SHARED src/main/cpp/amr_decoder.cpp ${src_amr_nb_common},${src_amr_nb_dec},${src_amr_nb_common})
##add_library(amr-codec SHARED src/main/cpp/amr_encoder.cpp ${src_amr_nb_common},${src_amr_nb_nec},${src_amr_nb_common})
##add_library(wrapper SHARED src/main/cpp/wrapper.cpp ${SRC_LIST})
#
#
#find_library(log-lib log)

#target_link_libraries(libpv_amr_nb_common_lib ${log-lib})


CMAKE_MINIMUM_REQUIRED(VERSION 3.4.1)

SET(MODULE_NAME libpv_amr_nb_common_lib)

INCLUDE_DIRECTORIES(
        src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include
        src/main/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src
)

#LINK_DIRECTORIES(
#        ${TTS_SDK_BIN_PATH}
#        ${TTS_SDK_LIB_PATH}
#        ${SERVER_ROOT_PATH}/deploy/common/bin
#        ${SERVER_ROOT_PATH}/build/common
#)

SET(LIBS common )

AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src SRCFILE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/jniLibs/${ANDROID_ABI})
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")

ADD_LIBRARY(
        ${MODULE_NAME}
        STATIC
        ${SRCFILE}
)

TARGET_LINK_LIBRARIES(${MODULE_NAME} ${LIBS})